package com.tbycoder.tby.entity.enu;


import lombok.Getter;

/**
 * @author tby
 * 身份枚举
 */
public enum IndentityEnum {
    ADMIN("1","管理员"),
    AUTOTEACHER("2","自动化教师"),
    SOFTTEACHER("3","软件工程教师"),
    STUDENT("4","学生"),
    ASSISTANT("5","辅导员"),
    CLASSTEACHER("6","班导师"),

    VISITOR("7","访客"),
    ;


    @Getter
    private String id;

    @Getter
    private String indentity;

    IndentityEnum(String id, String indentity) {
        this.id = id;
        this.indentity = indentity;
    }

    public static String getIndentityById(String id){
        String indentity = "";
        for(IndentityEnum indentityEnum: IndentityEnum.values()){
            if(indentityEnum.getId().equals(id)){
                indentity = indentityEnum.getIndentity();
                break;
            }
        }
        return indentity;
    }
}
